*****************************************
*** LANE AND SCHOENHERR CITE AND SWAY ***
*****************************************

* Purpose:
*	- Replicate Tables A12 - A17 in supplemental appendix

* Data Sources:
*	- Analysis1PetitionerData.dta
*	- Analysis1RespondentData.dta

* Run on:
*	- StataNow/SE 19.5 for Mac (Apple Silicon) on macOS Sequoia 15.1.1

* Associated codebook:
*	- Analysis1Codebook.pdf

*****************************************
*****************************************
*****************************************

*************************************
*** STEP 0: SET WORKING DIRECTORY ***
*************************************

cd ""

********************************
*** STEP 1: READ IN THE DATA ***
********************************

use "Analysis1PetitionerData.dta"

*************************************
*** STEP 2: CLUSTERED BY JUSTICE  ***
*************************************

* Table A12 in Supplemental Appendix

* TABLE A12, COLUMN 1
reg unnamedCiteCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(justice)

est store reg
estat ic

* TABLE A12, COLUMN 2
reg majCallOutCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(justice)

est store reg
estat ic

* TABLE A12, COLUMN 3
reg notMajOpinCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(justice)

est store reg
estat ic

**********************************
*** STEP 3: CLUSTERED BY TERM  ***
**********************************

* Table A13 in Supplemental Appendix

* TABLE A13, COLUMN 1
reg unnamedCiteCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(term)

est store reg
estat ic

* TABLE A13, COLUMN 2 
reg majCallOutCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(term)

est store reg
estat ic

* TABLE A13, COLUMN 3
reg notMajOpinCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(term)

est store reg
estat ic

***************************************
*** STEP 4: CLUSTERED BY ISSUEAREA  ***
***************************************

* Table A14 in Supplemental Appendix

* TABLE A14, COLUMN 1
reg unnamedCiteCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(issueArea)

est store reg
estat ic

* TABLE A14, COLUMN 2
reg majCallOutCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(issueArea)

est store reg
estat ic

* TABLE A14, COLUMN 3
reg notMajOpinCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(issueArea)

est store reg
estat ic

*************************************
*** STEP 5: READ IN THE RESP DATA ***
*************************************
clear

use "Analysis1RespondentData.dta"

*************************************
*** STEP 6: CLUSTERED BY JUSTICE  ***
*************************************

* Table A15 in Supplemental Appendix

* TABLE A15, COLUMN 1
reg unnamedCiteCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(justice)

est store reg
estat ic

* TABLE A15, COLUMN 2
reg majCallOutCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(justice)

est store reg
estat ic

* TABLE A15, COLUMN 3
reg notMajOpinCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(justice)

est store reg
estat ic

**********************************
*** STEP 7: CLUSTERED BY TERM  ***
**********************************

* Table A16 in Supplemental Appendix

* TABLE A16, COLUMN 1
reg unnamedCiteCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(term)

est store reg
estat ic

* TABLE A16, COLUMN 2
reg majCallOutCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(term)

est store reg
estat ic

* TABLE A16, COLUMN 3
reg notMajOpinCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(term)

est store reg
estat ic

***************************************
*** STEP 8: CLUSTERED BY ISSUEAREA  ***
***************************************

* Table A17 in Supplemental Appendix

* TABLE A17, COLUMN 1
reg unnamedCiteCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(issueArea)

est store reg
estat ic

* TABLE A17, COLUMN 2
reg majCallOutCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(issueArea)

est store reg
estat ic

* TABLE A17, COLUMN 3
reg notMajOpinCount median ideoAlign pastExpertise logAttorneyBriefExperience clerkedForThisJustice partyStatus logTotalNumCites, cluster(issueArea)

est store reg
estat ic









